package com.mf.service.impl;

import com.mf.controller.admin.GoodsPicController;
import com.mf.entity.GoodsPic;
import com.mf.repository.GoodsPicRepository;
import com.mf.service.GoodsPicService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 商品图片Service实现类
 *
 * @author: Jiang Runqing
 * @date: 2018-09-03 20:47
 */
@Service
public class GoodsPicServiceImpl implements GoodsPicService {

    @Resource
    private GoodsPicRepository goodsPicRepository;

    @Override
    public List<GoodsPic> findByGoodsId(int goodsId) {
        return goodsPicRepository.findByGoodsId(goodsId);
    }

    @Override
    public void save(GoodsPic goodsPic) {
        goodsPicRepository.save(goodsPic);
    }
}
